**# Bookmark #1 Setting

*Windows
global root  = "G:/Dropbox/Environmental Injustice/Empirical"
global rawdata = "$root/rawdata"
global workdata = "$root/workdata"
global results = "$root/results"
global outfile = "$root/outfile"
cd "$workdata"

**# Bookmark #2 Table S18 Panel A: Controlling for Access to Health Facilities

*Cardiovascular Disease
use "$outfile/Individual_heartandday.dta",clear

reghdfe heart lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post c.bed##i.post##i.lowedu5 c.doctor##i.post##i.lowedu5,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",replace ctitle(Cardiovascular Disease) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


*Inactive Days
use "$outfile/Individual_heartandday.dta",clear

reghdfe day lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post c.bed##i.post##i.lowedu5 c.doctor##i.post##i.lowedu5,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Inactive Days) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)


*Tumor
use "$outfile/Individual_tumor.dta",clear

reghdfe tumor lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post c.bed##i.post##i.lowedu5 c.doctor##i.post##i.lowedu5,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Tumor) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)



*Daily Work Hours

use "$outfile/Individual_hour.dta",clear

reghdfe hour lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post c.bed##i.post##i.lowedu5 c.doctor##i.post##i.lowedu5,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Daily Work Hours) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)



*Wage_100

use "$outfile/Individual_wage.dta",clear

reghdfe wage_100 lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post c.bed##i.post##i.lowedu5 c.doctor##i.post##i.lowedu5,absorb(i.id i.province#i.year) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Wage_100) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES) ///
bdec(3) tdec(3) rdec(3)

**# Bookmark #3 Table S18 Panel B: Controlling for the Effects of Age

*Cardiovascular Disease
use "$outfile/Individual_heartandday.dta",clear

reghdfe heart lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year i.age#i.lowedu5 i.age#i.notapwater) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Cardiovascular Disease) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES, AgebyBelowCollege FE, YES, AgebyNotapwater FE,YES) ///
bdec(3) tdec(3) rdec(3)


*Inactive Days
use "$outfile/Individual_heartandday.dta",clear

reghdfe day lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year i.age#i.lowedu5 i.age#i.notapwater) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Inactive Days) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES, AgebyBelowCollege FE, YES, AgebyNotapwater FE,YES) ///
bdec(3) tdec(3) rdec(3)


*Tumor
use "$outfile/Individual_tumor.dta",clear

reghdfe tumor lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year i.age#i.lowedu5 i.age#i.notapwater) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Tumor) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES, AgebyBelowCollege FE, YES, AgebyNotapwater FE,YES) ///
bdec(3) tdec(3) rdec(3)


*Daily Work Hours

use "$outfile/Individual_hour.dta",clear

reghdfe hour lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year i.age#i.lowedu5 i.age#i.notapwater) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Daily Work Hours) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES, AgebyBelowCollege FE, YES, AgebyNotapwater FE,YES) ///
bdec(3) tdec(3) rdec(3)


*Wage_100

use "$outfile/Individual_wage.dta",clear

reghdfe wage_100 lowedu5_post_notapwater lowedu5_post lowedu5_notapwater notapwater_post lowedu5 notapwater post ,absorb(i.id i.province#i.year i.age#i.lowedu5 i.age#i.notapwater) cluster(i.province i.year)

outreg2 using "$results/Table S18.xls",append ctitle(Wage_100) ///
keep(lowedu5_post_notapwater) ///
addtext(Individual FE, YES, ProvincebyYear FE, YES, AgebyBelowCollege FE, YES, AgebyNotapwater FE,YES) ///
bdec(3) tdec(3) rdec(3)

